// PeerLocal represents a pair peer connection
package session

import (
	"log"
	"sync"
)

/*

 seesion 保存着同一个session的所有client信息
 client 保持着用户信息，
 需要interface吗？
*/
type Session struct {
	Id string
	mu sync.RWMutex
	// config         WebRTCTransportConfig
	// peers          map[string]Peer
	// relayPeers     map[string]*RelayPeer
	// closed         atomicBool
	// audioObs       *AudioObserver
	// fanOutDCs      []string
	// datachannels   []*Datachannel
	// onCloseHandler func()
	Clients map[string]Client
}

type Client struct {
	id          string
	vedioSource bool //标识是否是视频源
	Forward     func()
}

// NewSession creates a new Session
func NewSession(id string) *Session {
	log.SetFlags(log.Ldate | log.Lshortfile)
	return &Session{
		Id: id,
	}
}

// NewSession creates a new SessionLocal
func NewClient(id string) *Client {
	s := &Client{
		id: id,
	}

	return s
}
